Software Testing: Concepts and Operations (Quantitative Software Engineering Series) by Ali Mili & Fairouz Tchier

Software Testing: Concepts and Operations (Quantitative Software Engineering Series) by Ali Mili & Fairouz Tchier

Author:Ali Mili & Fairouz Tchier [Mili, Ali]
Language: eng
Format: azw3
ISBN: 9781119065593
Publisher: Wiley
Published: 2015-05-20T04:00:00+00:00


Using function NextRand(), we can generate random integers that range uniformly between 1 (inclusive) and N (inclusive), for an arbitrary positive integer N.int function randomInt(int N) {return 1+ int(N*NextRand());}

Using function NextRand(), we can generate a Boolean function that returns true with a given probability (and false otherwise); the following function returns true with probability p.bool function randomBool(float p) {return (NextRand() <= p);}

Using function randomBool(), we can generate a Boolean function that returns true, on average, once every N times that it is called.bool function randomEvent(int N) {return (randomBool(1.0/N));}



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.